package Data;

import gameEngine.agents.choosingStrategy.EnumOfStrategy.Strategy_Type;
import gameEngine.agents.distrebution.EnumOfDistribution.Distribution_Type;
import gameEngine.agents.observationSystem.EnumOfObservation.Observation_Type;
import gameEngine.agents.observationSystem.analyzer.EnumOfAnalyzer.Analyzer_Type;
import gameEngine.agents.teamMateModel.EnumOfTeamateModel.Teammate_Meodel_Type;

import java.util.HashMap;

/**
 * 
 * @author vladimir && alon
 *
 * Hash Maps of <String,type> 
 * The String should be Compatible with config.properties file!!!
 * Type is the Enum of the parameter
 */
public class HashMapesOfParameters {

	private static HashMap<String, Distribution_Type> 		distributionMap = null;
	private static HashMap<String, Strategy_Type> 			strategyMap = null;
	private static HashMap<String, Analyzer_Type> 			analyzerMap = null;
	private static HashMap<String, Teammate_Meodel_Type> 	teammateModelMap = null;
	private static HashMap<String, Observation_Type> 		observationMap = null;
	
	
	/**
	 * Insert data to the hash
	 * Strings should be Compatible with config.properties file
	 */
	public static void initializeHashMap()
	{
		//insert to Distributions Map
		distributionMap = new HashMap<String, Distribution_Type>();
		distributionMap.put("Fixed", Distribution_Type.FIXED_DISTRIBUTION);
		distributionMap.put("Uniform", Distribution_Type.UNIFORM_DISTRIBUTION);
		distributionMap.put("Normal", Distribution_Type.NORMAL_DISTRIBUTION);
		distributionMap.put("Exponential", Distribution_Type.EXPONENTIAL_DISTRIBUTION);
		
		
		// insert to Strategy Map
		strategyMap = new HashMap<String, Strategy_Type>();
		strategyMap.put(ConfigurationParameters.Strategy.EGREEDY, Strategy_Type.E_GREEDY_STRATEGY);
		strategyMap.put(ConfigurationParameters.Strategy.SIMPLE_RANDOM, Strategy_Type.SIMPLE_RANDOM_STRATEGY);
		strategyMap.put(ConfigurationParameters.Strategy.GREEDY, Strategy_Type.GREEDY_STRATEGY);
		strategyMap.put(ConfigurationParameters.Strategy.MANUAL_ADAPTIVE, Strategy_Type.MANUAL_ADAPTIVE_STRATEGY);
		strategyMap.put(ConfigurationParameters.Strategy.ROUND_ROBIN, Strategy_Type.ROUND_ROBIN_STRATEGY);
		strategyMap.put(ConfigurationParameters.Strategy.SELECT_WORST, Strategy_Type.WORST_STRATEGY);
		
		// insert to Analyzer Map
		analyzerMap = new HashMap<String, Analyzer_Type>();
		analyzerMap.put(ConfigurationParameters.Analyzer.AVERAGE , Analyzer_Type.AVERAGE_ANALYZER);
		analyzerMap.put(ConfigurationParameters.Analyzer.MAX, Analyzer_Type.MAX_ANALYZER);
		analyzerMap.put(ConfigurationParameters.Analyzer.MIN , Analyzer_Type.MIN_ANALYZER);
		
		// insert to Team mate Model Map
		teammateModelMap = new HashMap<String, Teammate_Meodel_Type>();
		teammateModelMap.put(ConfigurationParameters.TeammateModel.INITIALIZE_RANDOM , Teammate_Meodel_Type.INIT_RANDOM_MODEL);
		teammateModelMap.put(ConfigurationParameters.TeammateModel.INITIALIZE_ZERO, Teammate_Meodel_Type.INIT_0_MODEL);	
		
		
		//insert to Observation Map
		observationMap = new HashMap<String, Observation_Type>();
		observationMap.put("Simple", Observation_Type.SIMPLE_OBSERVATION);
		
	}


	public static HashMap<String, Distribution_Type> getDistributionMap() {
		return distributionMap;
	}



	public static HashMap<String, Strategy_Type> getStrategyMap() {
		return strategyMap;
	}



	public static HashMap<String, Analyzer_Type> getAnalyzerMap() {
		return analyzerMap;
	}



	public static HashMap<String, Teammate_Meodel_Type> getTeammateModelMap() {
		return teammateModelMap;
	}



	public static HashMap<String, Observation_Type> getObservationMap() {
		return observationMap;
	}
	
}
